package com.emm.yixun.website.controller.router;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.emm.yixun.common.model.User;
import com.emm.yixun.website.common.utils.security.ShiroUtil;
import com.emm.yixun.website.constant.ConstantConfig;

@Controller
public class ReportRouterController {
	@Autowired
	private ConstantConfig constantConfig;
	//业务监控
	@RequestMapping("/router/report/businessMonitor")
    public String businessMonitor(ModelMap map){
		User user=ShiroUtil.getCurrentUser();
		map.put("merchantId", user.getMerchantId());
		map.put("dataBuildingUrl", constantConfig.getDataBuildingUrl());
    	return "/report/businessMonitor";
    }
	
	//指标达成
	@RequestMapping("/router/report/indexReach")
    public String indexReach(ModelMap map){
		User user=ShiroUtil.getCurrentUser();
		map.put("merchantId", user.getMerchantId());
		map.put("dataBuildingUrl", constantConfig.getDataBuildingUrl());
    	return "/report/indexReach";
    }
	
	//成交分析
	@RequestMapping("/router/report/transactionAnalysis")
	public String transactionAnalysis(ModelMap map){
	   User user=ShiroUtil.getCurrentUser();
	   map.put("merchantId", user.getMerchantId());
	   map.put("dataBuildingUrl", constantConfig.getDataBuildingUrl());
	   return "/report/transactionAnalysis";
	}
}
